<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .red{
            width: 300px;
            height: 300px;
            background-color: red;
        }
        .green{
            width: 200px;
            height: 200px;
            background-color: green;
        }
        .blue{
            width: 100px;
            height: 100px;
            background-color: blue;}
    </style>
</head>
<body>
    <div id="app">
    <div class="red" @click="showMeg('red')">
    <div class="green" @click.capture="showMeg('green')">
    <div class="blue">
        <a href="http://www.sina.com.cn" @clik.prevent.stop="showMeg('yellow')">新浪</a>
    </div>
    </div>
    </div>
    </div>
</body>
</html>
<script src="./vue.js"></script>
<script>
    new Vue({
        el:'#app',
        methods:{
            showMeg(log){
                alert("单机了红色盒子")
            }
        }
    })
</script>